Automated hierarchical tuning of configuration parameters for a multi-layer service

ABSTRACT

Example implementations relate to performing automated hierarchical configuration tuning for a multi-layer service. According to an example, a service definition and optimization criteria are received for tuning a configuration of a service. The service definition includes information regarding multiple of layers of the service and corresponding configuration groups. An acyclic dependency graph is created including nodes representing each of the of layers and each of the corresponding configuration groups. Configuration parameters of the configuration groups are globally optimized by creating an instance of the service within a test environment based on the service definition; and performing a local optimization process based on the optimization criteria at each layer of the instance of the service by passing identified optimized values of configuration parameters for a particular layer on to parent layers as defined by the acyclic dependency graph and propagating the identified optimized values through the dependency graph.

BACKGROUND Field

Embodiments of the present disclosure generally relate to web/microservices and configuration tuning. In particular, embodiments of thepresent disclosure relate to an automated and hierarchical approach fortuning of configuration parameters for a multi-layer service to meetspecified optimization goals.

Description of the Related Art

Web/micro services include a number of configuration parameters thatdictate the service performance. Optimizing these parametersappropriately can result in large performance gains and can reduce theoverall cost of running the service. Currently, these configurations areset manually based on a trial and error approach based on extensiveperformance testing by engineering teams. This manual trial and errorapproach leads to numerous issues. For example, due to the complexity ofidentifying optimal configurations, customers may optimize theconfiguration of each service tier in isolation without considering theimpact on other service tiers. Additionally, configuration parametersmay become obsolete over time as a result of changes to underlyinghardware and/or software resources associated with the productionenvironment. Furthermore, software and/or hardware differences betweentest and production environments may result in configurations that aresuboptimal. Alternatively, customers end up with end up withone-size-fits-all configurations by assuming parameters for oneenvironment are sufficient for another environment or may not tune mostof the configuration parameters and simply leave them at their defaults.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments described here are illustrated by way of example, and not byway of limitation, in the figures of the accompanying drawings in whichlike reference numerals refer to similar elements.

FIG. 1 is a block diagram depicting a service configuration tuningarchitecture in accordance with an embodiment.

FIGS. 2A and 2B are graphs illustrating the relationship between twodifferent configuration parameters and an output configurationparameter.

FIG. 3 is a block diagram conceptually illustrating the hierarchical andbi-directional nature of the passing of parameter configurations betweenlayers of a multi-layer service during an iteration of a parameteroptimization process in accordance with an embodiment.

FIG. 4 is a flow diagram illustrating an automated process forperforming hierarchical tuning of configuration parameters for amulti-layer service in accordance with an embodiment.

FIG. 5 is a flow diagram illustrating processing associated with asingle iteration of a configuration parameter optimization process inaccordance with an embodiment.

FIG. 6A is a block diagram illustrating an initial parameter graph inaccordance with an embodiment.

FIG. 6B is a block diagram illustrating the parameter graph of FIG. 6Aafter parameter selection is performed in accordance with an embodiment.

FIG. 6C is a block diagram illustrating the parameter graph of FIG. 6Bafter local optimizations have been performed in accordance with anembodiment.

FIG. 6D is a block diagram illustrating the parameter graph of FIG. 6Cafter global optimization has been completed in accordance with anembodiment.

FIGS. 7 and 8 are block diagrams of an environment in which an on-demanddatabase service might be used.

FIG. 9 is a block diagram of a computer system that may be part of acomputing environment in which service tuning processing may beperformed in in accordance with an embodiment.

DETAILED DESCRIPTION

Systems and methods are described for performing automated hierarchicalconfiguration tuning for a multi-layer service. In the followingdescription, numerous specific details are set forth in order to providea thorough understanding of example embodiments. It will be apparent,however, to one skilled in the art that embodiments described herein maybe practiced without some of these specific details. In other instances,well-known structures and devices are shown in block diagram form.

Embodiments described herein seek to address various of the aboveshortcomings described above by, among other things, reducing thecomplexity of the optimization problem by orders of magnitude. Accordingto one embodiment, the exploration search space to find minima/maxima ofthe hyperplane represented by the configuration parameters of themulti-layer service at issue is reduced by filtering out those of theconfiguration parameters that do not contribute significantly to theoverall optimization goal. For example, the parameters can be subjectedto statistical analysis and those that do not impact the optimizationgoal by a predefined or configurable threshold can be dropped fromfurther consideration.

Additionally, the hierarchical structure of the multi-layer service andassociated configuration groups may be maintained to preserve thesequencing nature of the optimization iterations by creating an acyclicdependency graph including the layers of the multi-layer service and thecorresponding configuration groups. In one embodiment, a globallyoptimal set of values for the relevant configuration parameters areidentified based on specified optimization criteria by iterativelyperforming a local optimization process at each layer of an instance ofthe multi-layer service at issue created within a test environment. Theidentified optimized values identified at a particular layer can bepropagated up the hierarchy based on the dependency graph until globaloptima are identified.

In one embodiment, the optimization process is a bi-directional processin which a failure to achieve the goal specified by the optimizationcriteria at the parent layer based on a particular identified localminimum/maximum of multiple local minima/maxima at the child layercauses a reevaluation to be performed at the child layer to identify analternative local minimum/maximum from among the multiple localminima/maxima.

According to one embodiment, the hierarchical optimization process isrepeated until the global goal is achieved by tracking a change in aperformance metric from iteration to iteration and if the change in thevalue of the performance metric does not meet a saturation threshold fora predefined or configurable number of runs, the process is terminated(as at this point a saturation point has been reached at which nofurther improvements in the performance metric are expected to beobserved).

Terminology

The terms “connected” or “coupled” and related terms are used in anoperational sense and are not necessarily limited to a direct connectionor coupling. Thus, for example, two devices may be coupled directly, orvia one or more intermediary media or devices. As another example,devices may be coupled in such a way that information can be passedthere between, while not sharing any physical connection with oneanother. Based on the disclosure provided herein, one of ordinary skillin the art will appreciate a variety of ways in which connection orcoupling exists in accordance with the aforementioned definition.

If the specification states a component or feature “may”, “can”,“could”, or “might” be included or have a characteristic, thatparticular component or feature is not required to be included or havethe characteristic.

As used in the description herein and throughout the claims that follow,the meaning of “a,” “an,” and “the” includes plural reference unless thecontext clearly dictates otherwise. Also, as used in the descriptionherein, the meaning of “in” includes “in” and “on” unless the contextclearly dictates otherwise.

The phrases “in an embodiment,” “according to one embodiment,” and thelike generally mean the particular feature, structure, or characteristicfollowing the phrase is included in at least one embodiment of thepresent disclosure, and may be included in more than one embodiment ofthe present disclosure. Importantly, such phrases do not necessarilyrefer to the same embodiment.

The phrase “configuration parameter” generally refers to a parameterassociated with a software component, a hardware component or a virtualhardware component that may be used to tune the performance of thecomponent at issue. The parameter may be a direct parameter or a derivedparameter of the directly available parameters. A non-limiting exampleof a software component parameter is a configuration parameter of aMicro/Web service. A non-limiting example of a hardwarecomponent-related parameter is Network Interface Card (NIC) speed.Non-limiting examples of virtual hardware component parameters includevirtual core count and vCPU thread counts. In one embodiment, each ofthe parameters are also associated with metadata that describe thevalues the parameters can take on. For example, the metadata may be ofcategorical nature and take on values like [‘ABC’, ‘LMN’, ‘XYZ’, . . . ]or the metadata may represent a range of continuous values (e.g.,[−infinity to +infinity], [50 to 100]). Non-limiting examples ofconfiguration parameters include network configuration parameters (e.g.,maximum transmission unit (MTU), transmission control protocol (TCP)segment size, TCP timeout, TCP send buffer size, TCP receive buffersize, and the like), database configuration parameters (e.g., storageengine, maximum number of connections, audit buffer size, number ofworker threads, transport method, maximum query degree, and the like),operating system configuration parameters (e.g., disk block size,filesystem, scheduler, memory, swap space, system open file limits,address space limits, file size limits, user process limits, diskreadahead, and the like), Java virtual machine (JVM) configurationparameters (e.g., code cache size, garbage collection, heap size, andthe like), and the like.

The phrase “optimization criteria” generally refers to informationand/or parameters associated with evaluating an optimization goal. Inthe context of various embodiments described herein an optimization goalmay be specified by a customer of a web/micro service with reference tooptimization criteria. Non-limiting examples of optimization criteriainclude one or more conditions (e.g., maximizing or minimizing) relatingto a particular performance metric or a group of performance metrics,optimization metadata that specifies an optimization algorithm to beused, and optimization parameters that control the behavior of thespecified optimization algorithm. Depending upon the particularimplementation, optimization criteria may be stored on a per-customerand/or per-web/micro service basis. While for sake of brevity, variousexamples described herein are described with reference to anoptimization goal of maximizing or minimizing a particular performancemetric, those skilled in the art will appreciate the methodologiesdescribed herein are equally applicable to an optimization goal thatincludes multiple performance metrics and other conditions.

A “performance metric” generally refers to a metric relating to theperformance of an application or service that is capable of beingqueried, measured or otherwise observed. Non-limiting examples ofperformance metrics include Quality of Service (QoS) metrics (e.g.,packet loss, bit rate, error rates, throughput, transmission delay,delay variation, availability, jitter, and the like), Service LevelAgreement (SLA) metrics (e.g., query response time, serviceavailability, defect rates, security performance, data rates,throughput, jitter, mean time between failures, mean time to repair,mean time to recovery, and the like) or other application or serviceperformance metrics (e.g., average response time, error rates, count ofapplication instances, request rate, application CPU usage, applicationavailability, garbage collection, number of concurrent users, and thelike).

A “service definition” generally refers to information about servicelayering, configuration information and/or versions of services and/orconfiguration information. In various embodiments described hereinservices may include multiple layers (e.g., an application layer, adatabase layer, a search layer, a caching layer, and the like) thatimplement particular sets of functionality and each layer of a servicemay have multiple configuration groups. According to one embodiment, theservice definition also include information identifying dependencyinformation, for example, dependencies among the multiple layers.

A “configuration group” generally refers to a set of configurations.Non-limiting examples of a configuration group include a group of one ormore of a set of operating system configuration parameters, a set ofnetwork configuration parameters, a set of JMV configuration parameters,a set of database configuration parameters, a set of search indexconfiguration parameters, and the like.

Architecture Overview

FIG. 1 is a block diagram depicting a service configuration tuningarchitecture 100 in accordance with an embodiment. In the context of thepresent example, the service configuration tuning architecture 100includes a state information database 110, a service and artifactrepository 120, a telemetry database 130, a parameter selection module140, an optimizer 160, and a target environment 170. In one embodiment,the service configuration tuning architecture 100 may be used as aninternal tool on behalf of a cloud-based software company to performconfiguration tuning on behalf of their customers. For example, thecloud-base software company may provide a multi-tenant, computingenvironment in which customers (tenants) run various services includingone developed by the cloud-based software company in the form of acustomer relationship management solution or an on-demand databaseservice, for example. Alternatively, the service configuration tuningarchitecture 100 may be provided as a service itself to allow the endusers of various services to obtain configuration parameter tuningrecommendations. While for purposes of providing a concrete example,various embodiments are described herein with reference to a particulartype of service and a particular computing environment through which theservice might be made available to end users, those skilled in the artwill appreciate the methodologies described herein are equallyapplicable to public, private and hybrid cloud environments as well asother types of services.

According to one embodiment, the state information database 110represents a storage layer of the service configuration tuningarchitecture 100. The state information database 100 may be used to keeptrack of the state information used for performing configurationoptimizations for various service builds in various target environments.Non-limiting examples of dimensions that may be represented within thestate information database 100 to achieve the hierarchal optimizationsdescribed herein include service definitions and correspondingoptimization criteria on a per-customer and/or per-service basis.

A service definition for a particular service may include informationabout service layering, configuration groups, and versions associatedwith the service and/or its associated configuration groups. In variousembodiments described herein, each service may have multiple layers andeach layer may have multiple configuration groups. For example, aservice (e.g., a customer relationship management solution) may have anapplication layer, a database layer and a search layer. According to oneembodiment, a configuration group represents the various configurationparameters for a particular layer of a service for which values may beconfigured. A configuration group may include configuration parametersassociated with one or more underlying resources (e.g., virtual orphysical computer resources or software tools) upon which the servicerelies. Non-limiting examples of configuration parameters that may bepart of a configuration group include operating system configurationparameters, network configuration parameters, JVM configurationparameters, and database configuration parameters.

Optimization criteria generally relate to information associated withevaluation of an optimization goal. According to one embodiment,customers may specify their optimization goals with reference tomaximizing or minimizing a particular performance metric (e.g., queryresponse time or service availability) and/or a group of performancemetrics along with corresponding optimization metadata, including theoptimization algorithm to be used and optimization parameters thatcontrol the behavior of the optimization algorithm. Those skilled in theart will appreciate there are a number of optimization algorithms,including Bayesian optimization and conjugate gradients, that may beemployed. In alternative embodiments, the optimization algorithm may notbe a parameter of the optimization criteria and may instead beprogrammatically selected based on the nature of a filtered set ofconfiguration parameters that will be the subject of the hierarchicaloptimization process. As described further below, in one embodimentbased on a service definition for a service at issue for whichconfiguration tuning is to be performed including information regardingits layers and their respective configuration groups, the configurationsare represented as part of an acyclic dependency group of configurationswith each configuration group connected to its respective layer and eachlayer connected to dependency layers. The graph structure may then beused to navigate through each configuration group and run a localoptimization and ultimately a global optimization as explained furtherbelow.

The parameter selection module 140 may be used to select an appropriatesubset of all of the configuration parameters represented collectivelyby the configuration groups associated with each layer of the service atissue. Typically, each layer of the service will have a set ofparameters (the configuration group) that can be configured to allow theuser of the service to optimize the service in accordance with theirparticular goals. Some of these parameters, however, will not contributesufficiently to certain optimization goals to be worthy of includingthem in the configuration tuning optimization process. As such,according to one embodiment, an initial parameter section process isperformed by the parameter selection module 140 to filter out suchnon-contributing configuration parameters or configuration parametersthat make a negligible contribution to the specified optimization goal.In this manner the set of parameters to be considered by theoptimization process is reduced, thereby reducing the complexity of theoptimization process and the time to produce optimization results.

As noted above, in one embodiment, a statistical approach can be used todetermine whether to retain or drop a particular configurationparameter. For example, as described further below, one way to determinethe validity of a configuration parameter is to isolate theconfiguration parameter and test it independently of the otherconfiguration parameters. In this manner, the problem can be simplifiedto a single dimension, thereby avoiding the combinatorial evaluation andalso allowing the testing process to be parallelized using multiplethreads at the same time, for example. It is common fordiscrete/continuous domain parameters to be used to compose optimizationgoals. Based on the nature of the configuration parameters at issue, inone embodiment, near equispaced combinations of a parameter hyperplanecan be generated and tests can be run on the parameter hyperplane tocheck the contribution of each parameter towards the specifiedoptimization goal. Assume, a particular configuration parameter has beenisolated and it has been found that it is a continuous parameter withrange [1 to 1000] from parameter metadata, for example. According to oneembodiment, since the configuration parameter at issue is a continuousattribute with 1-dimensional continuous range, astatistical/mathematical approach called sobol sequence may be used todeterministically choose a fairly even distribution of points in therange of [1 to 1000]. Then, these chosen points can be used run thetests and find out the worthiness of the configuration parameter'scontributions to the overall optimization. As described in furtherdetail below, in one embodiment, the parameters that do not provide aconfigurable threshold level of contribution to the optimization goalare dropped from the local and global optimization scope.

While the example described above is provided with reference to aparticular type of statistical/mathematical approach and with referenceto a continuous configuration parameter, those skilled in the art willappreciate the methodologies described herein are equally applicable tocategorical configuration parameters and other statistical approaches.For example, in the context of a categorical configuration parameter adifferent statistical approach may be used. Non-limiting examples ofstatistical methods that may be used include Sobol's sequence basedmethod, chi-square, and Laplace's method.

As described in further detail below with reference to FIGS. 3-5 , therole of the optimizer 160 is to pick each layer of the multi-layerservice and pass on the optimized parameters from the dependent layersto the parent layer, so that optimization on the most rudimentary layerresults in optimizing the entire service. In the context of the presentexample, the optimization process performed by the optimizer 160 isinfluenced by the parameter selection module 140. For example, in oneembodiment, the hierarchical optimization process performed by theoptimizer 160 can be simplified by considering only those of theparameters selected by the parameter selection module 140. Theoptimization process may also be dependent upon input from the servicebuild and artifact repository 120, which in accordance with anembodiment allows the optimizer 160 to create an instance of the servicethat matches the customer's service build and run it within a targetenvironment that matches the customer's production environment. Theoptimization process may also receive feedback from the telemetrydatabase 130, which captures values of configuration parameters andcorresponding values of performance metrics as the optimization processis being performed.

The service build and artifact repository 120 contains all the versionsof software builds desired to be emulated as well as their respectivedependencies. According to one embodiment, the service build andartifact repository 120 may include zip files, docker images, and jarfiles, for example, of software that can be used to compose the layersfor the service definitions in the state information database 110. Thisallows the service provider operating the service configuration tuningarchitecture to provide configuration tuning recommendations to avariety of customers that may be using different builds and/or versionsof the service at issue. According to one embodiment, the service buildsare run within the target environment 170 and used by the optimizer 160for running tests so as to allow desired performance metrics to becaptured during the optimization phases and be used as part of afeedback loop to improve on the optimization goals in an iterativemanner and associate the best configurations for particular combinationsof the builds.

The target environment 170 should resemble the customer's productionenvironment in which the service at issue is being run or will be run.According to one embodiment a Pod (e.g., a Kubernetes Pod) is the basicunit of deployment for a service. For example, a Pod may encapsulate anapplication's container (or, in some cases, multiple containers),storage resources as well as the options that govern how thecontainer(s) should run. A Pod can represent a single instance of anapplication, which might consist of either a single container (e.g., aDocker container) or a small number of containers that are tightlycoupled and that share resources. According to one embodiment, based onthe end goal(s) and the configuration groups defined in the stateinformation database 110 an appropriate target environment 170 isspawned by the optimizer 160 and optimization/performance metrics arecaptured and pushed to the telemetry database 130. In one embodiment,the optimizer 160 spawns these environments with different updatedconfiguration groups as it optimizes the environment toward the endgoal(s).

According to one embodiment, the telemetry database 130 stores thecaptured performance metric values and configuration settings used forthe various test runs. These values can then be used as part of afeedback loop to the optimizer 160 to tune the configuration settingsfurther.

Parameter Selection

FIGS. 2A and 2B are graphs illustrating the relationship between twodifferent configuration parameters and an output configurationparameter. As noted above, in one embodiment, a parameter selectionprocess is performed to filter out parameters that do not make aconfigurable threshold level of impact on the optimization goal (e.g.,minimizing query response time) so as to reduce the number ofconfiguration parameters considered by the optimization process. Forexample, an instance of the service can be created within the targetenvironment 170 and the target performance metric (e.g., query responsetime) can be captured for each test case represented by a particularcombination of configuration parameter values (each representing aspecific configuration) as dictated by the generated parameterhyperplane. As those skilled in the art will appreciate, a subset ofthese configurations will involve maintaining a constant value for allbut one configuration parameter, thereby allowing a determination of itscontribution independent of the others. According to one embodiment,this single-varying configuration parameter scenario may be representedwithin the generated parameter hyperplane multiple times for eachconfiguration parameter with different constant values being maintainedfor the other configuration parameters. In this manner, statisticalanalysis can then be performed on the various configurations and theobserved result on the target performance metric to quantify an average,mean, minimum, maximum or other statistical measure of the contributionof each of configuration parameters. This measure of contribution foreach of the configuration parameters may then be compared to apredefined or configurable threshold to filter out those found not tocontribute sufficiently to the optimization goal to include them in thesubsequent optimization processing.

For purposes of illustration, assume a set of two configurationparameters (P₁ and P₂) represent the configuration group for aparticular layer of the service at issue and the relationship betweenthe set of configuration parameters and an output parameter (e.g., atarget performance metric) is represented by the following equation:P ₁ ×P ₂ =O ₁

Turning now to FIG. 2A, it represents an example of a single-varyingconfiguration parameter scenario discussed above and illustrates how O₁responds to changes in the value of P₁ as P₂ is held constant. As can beseen in FIG. 2A, O₁ has a number of local maxima 201 a-e and a number oflocal minima 202 a-e. Assuming the variability of O₁ is sufficient tomeet the configurable threshold, this is the type of configurationparameter that would be maintained by the parameter selection processfor inclusion in subsequent optimization processing.

Referring now to FIG. 2B, it represents another example of asingle-varying configuration parameter scenario discussed above andillustrates how O₁ responds to changes in the value of P₂ as P₁ is heldconstant. As can be seen in FIG. 2B, the value of O₁ remains constantfor the range of values of P₂ tested. This means that fining a localmaxima/minima on this parameter will be futile (as it has a slope ofzero). This is an extreme example of the type of configuration parameterthat should be filtered out as part of the parameter selection process./

While this the above example has been described with reference to onlytwo configuration parameters, those skilled in the art will appreciateit is extensible to a greater number of configuration parameters.

Hierarchical, Bi-Directional Parameter Passing

FIG. 3 is a block diagram conceptually illustrating the hierarchical andbi-directional nature of the passing of parameter configurations betweenlayers of a multi-layer service during an iteration of a parameteroptimization process in accordance with an embodiment. In the context ofthe present example, the multi-layer service for which tuning ofconfiguration parameters is to be performed includes n tiers (layers)310 a-n. Those skilled in the art will appreciate any differential planeas a whole will have a single global maximum/minimum, but when splitinto fragments (e.g., by way of tiers 310 a-n) it will have multiplelocal maxima/minima. The global maximum/minimum is a subset of theselocal maxima/minima.

In embodiments described herein, as part of the optimization process, aparticular tier 310 a-n is selected and optimized for minima/maximabased on the optimization goal. The resulting configuration parametervalues (e.g., P₁ and P₂) are passed to each parent layer until theglobal optima is identified. As can be seen with reference to FIG. 3 ,this is a bi-directional process. For example, if at any layer of theservice, the optimization goal cannot be achieved, then the parametersare passed back through the child layers (so that the same set ofparameter values is not reused) and the optimization process is rerunfrom the initial layer. This process is repeated until the globaloptimization goal has been achieved. For a particular iteration of theoptimization process in which the local optimal parameter values alsorepresent local optimal parameter values at each subsequent layer, thenthe global maximum/minimum has been found.

Automated Hierarchical Configuration Parameter Tuning

FIG. 4 is a flow diagram illustrating an automated process forperforming hierarchical tuning of configuration parameters for amulti-layer service in accordance with an embodiment. The processingdescribed with reference to FIG. 4 may be implemented in the form ofexecutable instructions stored on a machine readable medium and executedby a processing resource (e.g., a microcontroller, a microprocessor,central processing unit core(s), an application-specific integratedcircuit (ASIC), a field programmable gate array (FPGA), and the like)and/or in the form of other types of electronic circuitry. For example,this processing may be performed by one or more physical or virtualcomputer systems, such as computer system 900 illustrated in FIG. 9 .

At block 410, a service definition and an optimization goal for theresulting configuration of the multi-layer service to be tuned isreceived. The general idea here is to gather sufficient informationregarding the configuration parameters involved and the customer'soptimization goal for the service. As such, more or less information maybe gathered depending upon whether the service for which configurationtuning is being performed is a service offered by a third party or oneprovided by the service provider operating the service configurationtuning service.

According to one embodiment, the service definition and the optimizationgoal are retrieved from a state information database (e.g., stateinformation database 110) that has been previously populated by or withthe input from the customer or user of the service at issue. Inalternative embodiments, some subset of all of the informationassociated with the service definition and the optimization goal may beinput by the operator of the service configuration tuning service at ornear the time of performing the configuration tuning via a graphicaluser interface, for example. As noted above, the service definition mayprovide information regarding the number and types of layers of themulti-layer service at issue. The service definition may also includeinformation regarding configuration groups associated with each layer ofthe multi-layer service. In addition, the service definition may specifya version of the multi-layer service and/or the configuration groups.

At block 420, an initial acyclic dependency or configuration parametergraph is built. According to one embodiment, a subset of the informationreceived at block 410 (e.g., the service definition for the service atissue for which configuration tuning is to be performed, includinginformation regarding its layers and their respective configurationgroups) is used to build the initial configuration parameter graph. Inone embodiment, the initial configuration parameter graph is built byconnecting each configuration group to its respective layer andconnecting each layer to a layer, if any, that is dependent upon it.According to one embodiment, the use of the acyclic configurationparameter graph facilitates maintaining of the hierarchical structure ofthe multi-layer service and associated configuration groups so as topreserve the sequencing nature of the optimization iterations. Forpurposes of illustration, a simplified and non-limiting example of aninitial configuration parameter graph is depicted in FIG. 6A.

According to one embodiment, at block 430, those of the configurationparameters that do not contribute sufficiently to the optimization goalare filtered out and no longer considered by subsequent processingblocks. Additionally, the state of the configuration parameter graph isupdated to reflect the dropping of any configuration parameters by thisparameter selection process. In one embodiment, this parameter selectionprocess is as described above in connection with the parameter selectionmodule 140 of FIG. 1 and with respect to FIGS. 2A and 2B. While thisparameter selection processing is thought to be advantageous as itreduces the complexity of the subsequent optimization processingdescribed further below, in alternative embodiments, the optimizationprocessing can be performed without performing this parameterselection/filtering.

At block 440, an instance of the service is created within a testenvironment (e.g., target environment 170). According to one embodiment,an optimization module (e.g., optimizer 160) spawns an appropriate testenvironment based on the configuration groups associated with the layersof the service at issue (or those remaining after the optional parameterselection process of block 430). In one embodiment, the service may berun within the test environment in the form of a Pod. For example, thePod may encapsulate the container of an application providing theservice as well as associated resources and options. Depending upon theparticular implementation, the test environment may be reconfigured asoptimization processing locks down various aspects of the configurationor new testing environments may be spawned as with different updatedconfiguration groups as it moves the environment toward the optimizationgoal(s).

At block 450, an iteration of hierarchical, bidirectional passing ofparameter configurations through the service layers of the configurationparameter graph is performed. As noted above, the configurationrepresenting the global maximum/minimum for the target performancemetric is a subset of the set of configurations representing localmaxima/minima agreed upon by the layers for the target performancemetric. According to one embodiment, this process traverses thehierarchy of layers of the service at issue with reference to thecurrent state of the parameter graph, starting at a selected layer ofthe hierarchy and performing a local optimization process at each layerseeking to identify a combination of local minima/maxima ofconfiguration parameter values that for the layers that maximizes orminimizes as the case may be the target performance metric. As there maybe many peaks and valleys in the fragmented differential plane resultingfrom the optimization being split among the layers, the maximum orminimum target performance metric identified by a single iteration islikely to represent a “false summit” or “false peak,” which inmountaineering, refer to a peak that appears to be the pinnacle of themountain but upon reaching it, it turns out the summit is higher. Assuch, in one embodiment, this process is repeated to evaluate othercombinations of local minima/maxima of configuration parameter valuesagreed upon by the layers. An example of an iteration of hierarchical,bidirectional passing of parameter configurations through the servicelayers of the configuration parameter graph is described further belowwith reference to FIG. 5 .

At block 460, a comparison is performed between the resulting value ofthe target performance metric for the current iteration with the prioriteration to identify a delta (change) in the value of the targetperformance metric from one iteration to another. According to oneembodiment, the values of parameters for the various configurationstested as well as the resulting value of the target performance metricare stored in the telemetry database 130.

One difficulty associated with iteratively searching for the globalminimum/maximum for a particular target metric is knowing when to stop.As such, in one embodiment, the optimization iteration of block 450 isrepeated until a saturation point is reached in which no furtherimprovement in the target performance metric is expected to be achieved.For example, a predetermined or configurable iteration threshold may beused to evaluate the change in the value of the target performancemetric from one iteration to another and a predetermined or configurablenumber of consecutive iterations failing to improve the targetperformance metric (referred to herein as a saturation threshold as itis indicative of the optimization processing having reached a saturationpoint) can be used as a stopping condition.

At decision block 470, the change in the value of the target performancemetric from one iteration to another is compared to the iterationthreshold. If the delta is greater than the iteration threshold, thenprocessing continues by looping back to block 450; otherwise, processingcontinues with block 480.

At block 480, the saturation run count is incremented to track thenumber of consecutive iterations for which the delta has remainedstagnant.

At decision block 490, the saturation run count is compared to thesaturation threshold. If the saturation run count is greater than thesaturation threshold, then the configuration parameter optimizationprocess is complete and the configuration represented by the currentiteration represents the global maximum/minimum for the targetperformance metric; otherwise, processing continues by looping back toblock 450.

While in the context of the present example, both an iteration thresholdand a saturation threshold are used to determine when to stop theoptimization processing, in alternative embodiments, the number ofiterations performed can be used alone as a stopping condition. Thoseskilled in the art will appreciate that differential planes used to findmaxima/minima for difference sets of configuration parameters willnecessarily behave differently. As such, the various thresholdsdescribed herein should be set in accordance with the differentialplanes associated with the service at issue.

Iteration Processing

FIG. 5 is a flow diagram illustrating processing associated with asingle iteration of a configuration parameter optimization process inaccordance with an embodiment. As above, the processing described withreference to FIG. 5 may be implemented in the form of executableinstructions stored on a machine readable medium and executed by aprocessing resource (e.g., a microcontroller, a microprocessor, centralprocessing unit core(s), an application-specific integrated circuit(ASIC), a field programmable gate array (FPGA), and the like) and/or inthe form of other types of electronic circuitry. For example, thisprocessing may be performed by one or more physical or virtual computersystems, such as computer system 900 illustrated in FIG. 9 .

At block 510, one of the layers of the multi-layer service is selectedwithin the current state of the parameter graph. According to oneembodiment, in each iteration a different layer of the multi-layerservice is selected. Alternatively, the service definition may specify alayer to be used as the starting point and the parameter graph links canbe followed from there. In one embodiment, the node representing thestarting point for the iteration processing is selected randomly and theparameter graph links can be followed from there. To the extent one ormore nodes remain unexplored, a random jump may be made to an unexplorednode.

At block 520, a configuration representing a local minima/maxima for theoptimization goal is identified for the configuration parameters at thecurrent layer (which is initially the layer selected at block 510).

At block 530, the parameter values associated with the configurationidentified at block 520 are evaluated at the parent layer.

At decision block 540, it is determined whether the configuration alsorepresents a local maxima/minima for the parent layer. If so, thenprocessing branches to decision block 550; otherwise, processingcontinues with block 560.

At decision block 550, it is determined if there is another parent layerfor which the configuration should be evaluated. If so, then processingcontinues with block 530; otherwise, this iteration is complete and thecurrent configuration and the value of the target parameter are returnedto the caller or otherwise logged. For example, in one embodiment, thesevalues are stored in telemetry database 130.

While for purposes of clarity, the iteration processing described abovewith reference to FIG. 5 is not described in a recursive manner, thoseskilled in the art will appreciate a recursive algorithm may be used toimplement, the above-described iteration processing.

Configuration Parameter Tuning Example

FIG. 6A is a block diagram illustrating an initial parameter graph 600in accordance with an embodiment. In the context of the present example,it is assumed the multi-layer service for which configuration parametervalues are to be optimized includes two layers, a database (DB) layer610 and an application (App) layer 620. The DB layer 610 has anassociated configuration group including an operating systemconfiguration parameter relating to the filesystem 611, a networkconfiguration parameter relating to MTU 612, an operating systemconfiguration parameter relating to block size 613, and a DBconfiguration parameter relating to the storage engine 614. The Applayer 620 has an associated configuration group including a networkconfiguration parameter relating to a TCP timeout 621, an operatingsystem configuration parameter relating to block size 622, an operatingsystem configuration parameter relating to the filesystem 623, anoperating system configuration parameter relating to the scheduler 624,and a JVM configuration parameter relating to code cache size 625. Basedon their respective contributions to the specified optimization goal, asdetermined by running various tests on the parameter hyperplane asdiscussed above, for example, weights have been assigned to the nodes.In this example, the nodes with dashed outlines (i.e., nodes 611, 614,623, and 624) have been determined by the parameter selection processnot to meet a configurable threshold level of contribution to theoptimization goal. As such in FIG. 6B, which represents the parametergraph of FIG. 6A after parameter selection has been performed inaccordance with an embodiment, nodes 611, 614, 623, and 624 are nolonger part of the parameter graph as they have been filtered out so asto improve the efficiency of the subsequent optimization processing.

FIG. 6C is a block diagram illustrating the parameter graph of FIG. 6Bafter local optimizations have been performed in accordance with anembodiment. In the context of this example, as a result of localoptimization processing performed at nodes 610 and 620 the weightsassociated with nodes 612, 613, 621, 622 and 625 have been updated.

FIG. 6D is a block diagram illustrating the parameter graph of FIG. 6Cafter global optimization has been completed in accordance with anembodiment. In the context of this example, upon identifying a globalmaximum/minimum for the target performance metric, the weightsassociated with nodes 610 and 620 are updated.

Example Service Environment

FIG. 7 illustrates a block diagram of an environment 710 wherein anon-demand database service might be used. Environment 710 may includeuser systems 712, network 714, system 716, processor system 717,application platform 718, network interface 720, tenant data storage722, system data storage 724, program code 726, and process space 728.In other embodiments, environment 710 may not have all of the componentslisted and/or may have other elements instead of, or in addition to,those listed above.

Environment 710 is an environment in which an on-demand database serviceexists. User system 712 may be any machine or system that is used by auser to access a database user system. For example, any of user systems712 can be a handheld computing device, a mobile phone, a laptopcomputer, a work station, and/or a network of computing devices. Asillustrated in herein FIG. 7 (and in more detail in FIG. 8 ) usersystems 712 might interact via a network 714 with an on-demand databaseservice, which is system 716.

An on-demand database service, such as system 716, is a database systemthat is made available to outside users that do not need to necessarilybe concerned with building and/or maintaining the database system, butinstead may be available for their use when the users need the databasesystem (e.g., on the demand of the users). Some on-demand databaseservices may store information from one or more tenants stored intotables of a common database image to form a multi-tenant database system(MTS). Accordingly, “on-demand database service 716” and “system 716”will be used interchangeably herein. A database image may include one ormore database objects. A relational database management system (RDMS) orthe equivalent may execute storage and retrieval of information againstthe database object(s). Application platform 718 may be a framework thatallows the applications of system 716 to run, such as the hardwareand/or software, e.g., the operating system. In an embodiment, on-demanddatabase service 716 may include an application platform 718 thatenables creation, managing and executing one or more applicationsdeveloped by the provider of the on-demand database service, usersaccessing the on-demand database service via user systems 712, or thirdparty application developers accessing the on-demand database servicevia user systems 712.

The users of user systems 712 may differ in their respective capacities,and the capacity of a particular user system 712 might be entirelydetermined by permissions (permission levels) for the current user. Forexample, where a salesperson is using a particular user system 712 tointeract with system 716, that user system has the capacities allottedto that salesperson. However, while an administrator is using that usersystem to interact with system 716, that user system has the capacitiesallotted to that administrator. In systems with a hierarchical rolemodel, users at one permission level may have access to applications,data, and database information accessible by a lower permission leveluser, but may not have access to certain applications, databaseinformation, and data accessible by a user at a higher permission level.Thus, different users will have different capabilities with regard toaccessing and modifying application and database information, dependingon a user's security or permission level.

Network 714 is any network or combination of networks of devices thatcommunicate with one another. For example, network 714 can be any one orany combination of a LAN (local area network), WAN (wide area network),telephone network, wireless network, point-to-point network, starnetwork, token ring network, hub network, or other appropriateconfiguration. As the most common type of computer network in currentuse is a TCP/IP (Transfer Control Protocol and Internet Protocol)network, such as the global internetwork of networks often referred toas the “Internet” with a capital “I,” that network will be used in manyof the examples herein. However, it should be understood that thenetworks that one or more implementations might use are not so limited,although TCP/IP is a frequently implemented protocol.

User systems 712 might communicate with system 716 using TCP/IP and, ata higher network level, use other common Internet protocols tocommunicate, such as HTTP, FTP, AFS, WAP, etc. In an example where HTTPis used, user system 712 might include an HTTP client commonly referredto as a “browser” for sending and receiving HTTP messages to and from anHTTP server at system 716. Such an HTTP server might be implemented asthe sole network interface between system 716 and network 714, but othertechniques might be used as well or instead. In some implementations,the interface between system 716 and network 714 includes load sharingfunctionality, such as round-robin HTTP request distributors to balanceloads and distribute incoming HTTP requests evenly over a plurality ofservers. At least as for the users that are accessing that server, eachof the plurality of servers has access to the MTS' data; however, otheralternative configurations may be used instead.

In one embodiment, system 716, shown in FIG. 7 , implements a web-basedcustomer relationship management (CRM) system. For example, in oneembodiment, system 716 includes application servers configured toimplement and execute CRM software applications as well as providerelated data, code, forms, webpages and other information to and fromuser systems 712 and to store to, and retrieve from, a database systemrelated data, objects, and Webpage content. With a multi-tenant system,data for multiple tenants may be stored in the same physical databaseobject, however, tenant data typically is arranged so that data of onetenant is kept logically separate from that of other tenants so that onetenant does not have access to another tenant's data, unless such datais expressly shared. In certain embodiments, system 716 implementsapplications other than, or in addition to, a CRM application. Forexample, system 716 may provide tenant access to multiple hosted(standard and custom) applications, including a CRM application. User(or third party developer) applications, which may or may not includeCRM, may be supported by the application platform 718, which managescreation, storage of the applications into one or more database objectsand executing of the applications in a virtual machine in the processspace of the system 716.

One arrangement for elements of system 716 is shown in FIG. 7 ,including a network interface 720, application platform 718, tenant datastorage 722 for tenant data 723, system data storage 724 for system data725 accessible to system 716 and possibly multiple tenants, program code726 for implementing various functions of system 716, and a processspace 728 for executing MTS system processes and tenant-specificprocesses, such as running applications as part of an applicationhosting service. Additional processes that may execute on system 716include database indexing processes.

Several elements in the system shown in FIG. 7 include conventional,well-known elements that are explained only briefly here. For example,each user system 712 could include a desktop personal computer,workstation, laptop, PDA, cell phone, or any wireless access protocol(WAP) enabled device or any other computing device capable ofinterfacing directly or indirectly to the Internet or other networkconnection. User system 712 typically runs an HTTP client, e.g., abrowsing program, such as Edge from Microsoft, Safari from Apple, Chromefrom Google, or a WAP-enabled browser in the case of a cell phone, PDAor other wireless device, or the like, allowing a user (e.g., subscriberof the multi-tenant database system) of user system 712 to access,process and view information, pages and applications available to itfrom system 716 over network 714. Each user system 712 also typicallyincludes one or more user interface devices, such as a keyboard, amouse, touch pad, touch screen, pen or the like, for interacting with agraphical user interface (GUI) provided by the browser on a display(e.g., a monitor screen, LCD display, etc.) in conjunction with pages,forms, applications and other information provided by system 716 orother systems or servers. For example, the user interface device can beused to access data and applications hosted by system 716, and toperform searches on stored data, and otherwise allow a user to interactwith various GUI pages that may be presented to a user. As discussedabove, embodiments are suitable for use with the Internet, which refersto a specific global internetwork of networks. However, it should beunderstood that other networks can be used instead of the Internet, suchas an intranet, an extranet, a virtual private network (VPN), anon-TCP/IP based network, any LAN or WAN or the like.

According to one embodiment, each user system 712 and all of itscomponents are operator configurable using applications, such as abrowser, including computer code run using a central processing unitsuch as an Intel Core series processor or the like. Similarly, system716 (and additional instances of an MTS, where more than one is present)and all of their components might be operator configurable usingapplication(s) including computer code to run using a central processingunit such as processor system 717, which may include an Intel Coreseries processor or the like, and/or multiple processor units. Acomputer program product embodiment includes a machine-readable storagemedium (media) having instructions stored thereon/in which can be usedto program a computer to perform any of the processes of the embodimentsdescribed herein. Computer code for operating and configuring system 716to intercommunicate and to process webpages, applications and other dataand media content as described herein are preferably downloaded andstored on a hard disk, but the entire program code, or portions thereof,may also be stored in any other volatile or non-volatile memory mediumor device as is well known, such as a ROM or RAM, or provided on anymedia capable of storing program code, such as any type of rotatingmedia including floppy disks, optical discs, digital versatile disk(DVD), compact disk (CD), microdrive, and magneto-optical disks, andmagnetic or optical cards, nanosystems (including molecular memory ICs),or any type of media or device suitable for storing instructions and/ordata. Additionally, the entire program code, or portions thereof, may betransmitted and downloaded from a software source over a transmissionmedium, e.g., over the Internet, or from another server, as is wellknown, or transmitted over any other conventional network connection asis well known (e.g., extranet, VPN, LAN, etc.) using any communicationmedium and protocols (e.g., TCP/IP, HTTP, HTTPS, Ethernet, etc.) as arewell known. It will also be appreciated that computer code forimplementing embodiments can be implemented in any programming languagethat can be executed on a client system and/or server or server systemsuch as, for example, C, C++, HTML, any other markup language, Java™,JavaScript, ActiveX, any other scripting language, such as VBScript, andmany other programming languages as are well known may be used. (Java™is a trademark of Sun Microsystems, Inc.).

According to one embodiment, each system 716 is configured to providewebpages, forms, applications, data and media content to user (client)systems 712 to support the access by user systems 712 as tenants ofsystem 716. As such, system 716 provides security mechanisms to keepeach tenant's data separate unless the data is shared. If more than oneMTS is used, they may be located in close proximity to one another(e.g., in a server farm located in a single building or campus), or theymay be distributed at locations remote from one another (e.g., one ormore servers located in city A and one or more servers located in cityB). As used herein, each MTS could include one or more logically and/orphysically connected servers distributed locally or across one or moregeographic locations. Additionally, the term “server” is meant toinclude a computer system, including processing hardware and processspace(s), and an associated storage system and database application(e.g., OODBMS or RDBMS) as is well known in the art. It should also beunderstood that “server system” and “server” are often usedinterchangeably herein. Similarly, the database object described hereincan be implemented as single databases, a distributed database, acollection of distributed databases, a database with redundant online oroffline backups or other redundancies, etc., and might include adistributed database or storage network and associated processingintelligence.

FIG. 8 also illustrates environment 710. However, in FIG. 8 elements ofsystem 716 and various interconnections in an embodiment are furtherillustrated. FIG. 8 shows that user system 712 may include processorsystem 712A, memory system 712B, input system 712C, and output system712D. FIG. 8 shows network 714 and system 716. FIG. 8 also shows thatsystem 716 may include tenant data storage 722, tenant data 723, systemdata storage 724, system data 725, User Interface (UI) 830, ApplicationProgram Interface (API) 832, PL/SOQL 834, save routines 836, applicationsetup mechanism 838, applications servers 800 ₁-800 _(N), system processspace 802, tenant process spaces 804, tenant management process space810, tenant storage area 812, user storage 814, and application metadata816. In other embodiments, environment 710 may not have the sameelements as those listed above and/or may have other elements insteadof, or in addition to, those listed above.

User system 712, network 714, system 716, tenant data storage 722, andsystem data storage 724 were discussed above in FIG. 7 . Regarding usersystem 712, processor system 712A may be any combination of one or moreprocessors. Memory system 712B may be any combination of one or morememory devices, short term, and/or long term memory. Input system 712Cmay be any combination of input devices, such as one or more keyboards,mice, trackballs, scanners, cameras, and/or interfaces to networks.Output system 712D may be any combination of output devices, such as oneor more monitors, printers, and/or interfaces to networks. As shown byFIG. 8 , system 716 may include a network interface 720 (of FIG. 7 )implemented as a set of HTTP application servers 800, an applicationplatform 718, tenant data storage 722, and system data storage 724. Alsoshown is system process space 802, including individual tenant processspaces 804 and a tenant management process space 810. Each applicationserver 800 may be configured to tenant data storage 722 and the tenantdata 723 therein, and system data storage 724 and the system data 725therein to serve requests of user systems 712. The tenant data 723 mightbe divided into individual tenant storage areas 812, which can be eithera physical arrangement and/or a logical arrangement of data. Within eachtenant storage area 812, user storage 814 and application metadata 816might be similarly allocated for each user. For example, a copy of auser's most recently used (MRU) items might be stored to user storage814. Similarly, a copy of MRU items for an entire organization that is atenant might be stored to tenant storage area 812. A UI 830 provides auser interface and an API 832 provides an application programmerinterface to system 716 resident processes to users and/or developers atuser systems 712. The tenant data and the system data may be stored invarious databases, such as one or more Oracle™ databases.

Application platform 718 includes an application setup mechanism 838that supports application developers' creation and management ofapplications, which may be saved as metadata into tenant data storage722 by save routines 836 for execution by subscribers as one or moretenant process spaces 804 managed by tenant management process 810 forexample. Invocations to such applications may be coded using PL/SOQL 834that provides a programming language style interface extension to API832. A detailed description of some PL/SOQL language embodiments isdiscussed in commonly owned U.S. Pat. No. 7,730,478 entitled, “Methodand System for Allowing Access to Developed Applicants via aMulti-Tenant Database On-Demand Database Service,” issued Jun. 1, 2010to Craig Weissman, which is incorporated in its entirety herein for allpurposes. Invocations to applications may be detected by one or moresystem processes, which manage retrieving application metadata 816 forthe subscriber making the invocation and executing the metadata as anapplication in a virtual machine.

Each application server 800 may be communicably coupled to databasesystems, e.g., having access to system data 725 and tenant data 723, viaa different network connection. For example, one application server 800₁ might be coupled via the network 714 (e.g., the Internet), anotherapplication server 800 _(N-1) might be coupled via a direct networklink, and another application server 800 _(N) might be coupled by yet adifferent network connection. Transfer Control Protocol and InternetProtocol (TCP/IP) are typical protocols for communicating betweenapplication servers 800 and the database system. However, it will beapparent to one skilled in the art that other transport protocols may beused to optimize the system depending on the network interconnect used.

In certain embodiments, each application server 800 is configured tohandle requests for any user associated with any organization that is atenant. Because it is desirable to be able to add and remove applicationservers from the server pool at any time for any reason, there ispreferably no server affinity for a user and/or organization to aspecific application server 800. In one embodiment, therefore, aninterface system implementing a load balancing function (e.g., an F5BIG-IP load balancer) is communicably coupled between the applicationservers 800 and the user systems 712 to distribute requests to theapplication servers 800. In one embodiment, the load balancer uses aleast connections algorithm to route user requests to the applicationservers 800. Other examples of load balancing algorithms, such as roundrobin and observed response time, also can be used. For example, incertain embodiments, three consecutive requests from the same user couldhit three different application servers 800, and three requests fromdifferent users could hit the same application server 800. In thismanner, system 716 is multi-tenant, wherein system 716 handles storageof, and access to, different objects, data and applications acrossdisparate users and organizations.

As an example of storage, one tenant might be a company that employs asales force where each salesperson uses system 716 to manage their salesprocess. Thus, a user might maintain contact data, leads data, customerfollow-up data, performance data, goals and progress data, etc., allapplicable to that user's personal sales process (e.g., in tenant datastorage 722). In an example of a MTS arrangement, since all of the dataand the applications to access, view, modify, report, transmit,calculate, etc., can be maintained and accessed by a user system havingnothing more than network access, the user can manage his or her salesefforts and cycles from any of many different user systems. For example,if a salesperson is visiting a customer and the customer has Internetaccess in their lobby, the salesperson can obtain critical updates as tothat customer while waiting for the customer to arrive in the lobby.

While each user's data might be separate from other users' dataregardless of the employers of each user, some data might beorganization-wide data shared or accessible by a plurality of users orall of the users for a given organization that is a tenant. Thus, theremight be some data structures managed by system 716 that are allocatedat the tenant level while other data structures might be managed at theuser level. Because an MTS might support multiple tenants includingpossible competitors, the MTS should have security protocols that keepdata, applications, and application use separate. Also, because manytenants may opt for access to an MTS rather than maintain their ownsystem, redundancy, up-time, and backup are additional functions thatmay be implemented in the MTS. In addition to user-specific data andtenant specific data, system 716 might also maintain system level datausable by multiple tenants or other data. Such system level data mightinclude industry reports, news, postings, and the like that are sharableamong tenants.

In certain embodiments, user systems 712 (which may be client systems)communicate with application servers 800 to request and updatesystem-level and tenant-level data from system 716 that may requiresending one or more queries to tenant data storage 722 and/or systemdata storage 724. System 716 (e.g., an application server 800 in system716) automatically generates one or more SQL statements (e.g., one ormore SQL queries) that are designed to access the desired information.System data storage 724 may generate query plans to access the requesteddata from the database.

Each database can generally be viewed as a collection of objects, suchas a set of logical tables, containing data fitted into predefinedcategories. A “table” is one representation of a data object, and may beused herein to simplify the conceptual description of objects and customobjects. It should be understood that “table” and “object” may be usedinterchangeably herein. Each table generally contains one or more datacategories logically arranged as columns or fields in a viewable schema.Each row or record of a table contains an instance of data for eachcategory defined by the fields. For example, a CRM database may includea table that describes a customer with fields for basic contactinformation such as name, address, phone number, fax number, etc.Another table might describe a purchase order, including fields forinformation such as customer, product, sale price, date, etc. In somemulti-tenant database systems, standard entity tables might be providedfor use by all tenants. For CRM database applications, such standardentities might include tables for Account, Contact, Lead, andOpportunity data, each containing pre-defined fields. It should beunderstood that the word “entity” may also be used interchangeablyherein with “object” and “table”.

In some multi-tenant database systems, tenants may be allowed to createand store custom objects, or they may be allowed to customize standardentities or objects, for example by creating custom fields for standardobjects, including custom index fields. U.S. patent application Ser. No.10/817,161, filed Apr. 2, 2004, entitled “Custom Entities and Fields ina Multi-Tenant Database System”, and which is hereby incorporated hereinby reference, teaches systems and methods for creating custom objects aswell as customizing standard objects in a multi-tenant database system.In certain embodiments, for example, all custom entity data rows arestored in a single multi-tenant physical table, which may containmultiple logical tables per organization. It is transparent to customersthat their multiple “tables” are in fact stored in one large table orthat their data may be stored in the same table as the data of othercustomers.

Embodiments described herein include various steps, examples of whichhave been described above. As described further below, these steps maybe performed by hardware components or may be embodied inmachine-executable instructions, which may be used to cause ageneral-purpose or special-purpose processor programmed with theinstructions to perform the steps. Alternatively, at least some stepsmay be performed by a combination of hardware, software, and/orfirmware.

Embodiments described herein may be provided as a computer programproduct, which may include a machine-readable storage medium tangiblyembodying thereon instructions, which may be used to program a computer(or other electronic devices) to perform a process. The machine-readablemedium may include, but is not limited to, fixed (hard) drives, magnetictape, floppy diskettes, optical disks, compact disc read-only memories(CD-ROMs), and magneto-optical disks, semiconductor memories, such asROMs, PROMs, random access memories (RAMs), programmable read-onlymemories (PROMs), erasable PROMs (EPROMs), electrically erasable PROMs(EEPROMs), flash memory, magnetic or optical cards, or other type ofmedia/machine-readable medium suitable for storing electronicinstructions (e.g., computer programming code, such as software orfirmware).

Various methods described herein may be practiced by combining one ormore machine-readable storage media containing the code according toexample embodiments described herein with appropriate standard computerhardware to execute the code contained therein. An apparatus forpracticing various example embodiments described herein may involve oneor more computing elements or computers (or one or more processorswithin a single computer) and storage systems containing or havingnetwork access to computer program(s) coded in accordance with variousmethods described herein, and the method steps of various exampleembodiments described herein may be accomplished by modules, routines,subroutines, or subparts of a computer program product.

Example Computer System

FIG. 9 is a block diagram of a computer system in accordance with anembodiment. In the example illustrated by FIG. 9 , computer system 900includes a processing resource 910 coupled to a non-transitory, machinereadable medium 920 encoded with instructions to tune configurationparameters of a multi-layer service in accordance with an embodiment.The processing resource 910 may include a microcontroller, amicroprocessor, central processing unit core(s), an ASIC, an FPGA,and/or other hardware device suitable for retrieval and/or execution ofinstructions from the machine readable medium 920 to perform thefunctions related to various examples described herein. Additionally oralternatively, the processing resource 910 may include electroniccircuitry for performing the functionality of the instructions describedherein.

The machine readable medium 920 may be any medium suitable for storingexecutable instructions. Non-limiting examples of machine readablemedium 920 include RAM, ROM, EEPROM, flash memory, a hard disk drive, anoptical disc, or the like. The machine readable medium 920 may bedisposed within the computer system 900, as shown in FIG. 9 , in whichcase the executable instructions may be deemed “installed” or “embedded”on the computer system 900. Alternatively, the machine readable medium920 may be a portable (e.g., external) storage medium, and may be partof an “installation package.” The instructions stored on the machinereadable medium 920 may be useful for implementing at least part of themethods described herein.

In the context of the present example, the machine readable medium 920is encoded with a set of executable instructions 930-980. It should beunderstood that part or all of the executable instructions and/orelectronic circuits included within one block may, in alternateimplementations, be included in a different block shown in the figuresor in a different block not shown.

Instructions 930, upon execution, cause the processing resource 910 toreceive a service definition and an optimization goal. In oneembodiment, instructions 930 may correspond generally to instructionsfor performing block 410 of FIG. 4 .

Instructions 940, upon execution, cause the processing resource 910 tobuild an acyclic configuration parameter graph. In one embodiment,instructions 940 may correspond generally to instructions for performingblock 420 of FIG. 4 .

Instructions 950, upon execution, cause the processing resource 910 toperform optional parameter selection/filtering. In one embodiment,instructions 950 may correspond generally to instructions for performingblock 430 of FIG. 4 .

Instructions 960, upon execution, cause the processing resource 910 tocreate an instance of the service within a test environment. In oneembodiment, instructions 960 may correspond generally to instructionsfor performing block 440 of FIG. 4 .

Instructions 970, upon execution, cause the processing resource 910 toperform iterations of hierarchical, bidirectional passing of parameterconfigurations through the service layers of the configuration parametergraph. In one embodiment, instructions 970 may correspond generally toinstructions for performing block 450 of FIG. 4 .

Instructions 980, upon execution, cause the processing resource 910 tostop the iterations being performed by instructions 970. In oneembodiment, instructions 980 may correspond generally to instructionsfor performing blocks 460-490 of FIG. 4 .

In the foregoing description, numerous details are set forth to providean understanding of the subject matter disclosed herein. However,implementation may be practiced without some or all of these details.Other implementations may include modifications and variations from thedetails discussed above. It is intended that the following claims coversuch modifications and variations.

What is claimed is:
 1. A computer-implemented method comprising:receiving, by an optimization process running on one or more computersystems, a service definition and optimization criteria for tuning aconfiguration of a service for a particular production environment,wherein the service definition includes information regarding aplurality of layers of the service and corresponding configurationgroups, each configuration group including configuration parameters fora corresponding layer of the service and for which values areconfigurable; creating, by the optimization process, an acyclicdependency graph including a plurality of nodes, wherein a noderepresents a layer in the plurality of layers, the acyclic dependencygraph representing configuration groups passed between the plurality oflayers and representing a hierarchical relationship between theplurality of layers of the service; and globally optimizing, by anoptimization process running on the one or more computer systems, valuesof configuration parameters of the configuration groups by: creating aninstance of the service based on the service definition; and performinga local optimization process based on the optimization criteria at eachlayer of the plurality of layers of the instance of the service bylocally optimizing values of configuration parameters associated with aparticular layer in the plurality of layers for a first node beforepassing the optimized values of configuration parameters for the firstnode on to a parent node associated with a parent layer in the pluralityof layers as defined by the acyclic dependency graph and propagatingrespective optimized values for respective nodes that are associatedwith respective layers through the nodes of the dependency graph.
 2. Themethod of claim 1, wherein the optimization criteria specify anoptimization goal for the service in terms of a target performancemetric of the service.
 3. The method of claim 1, further comprising,prior to the globally optimizing, limiting, by a parameter selectionprocess running on the one or more computer systems, the configurationparameters to those configuration parameters represented within thecorresponding configuration groups that have a particular level of animpact on the optimization goal for the service.
 4. The method of claim3, wherein the limiting includes subjecting the configuration parametersto statistical analysis.
 5. The method of claim 3, wherein the limitingcomprises: for each layer of the plurality of layers of the service anda configuration group of the corresponding configuration groupscorresponding to the layer, reducing, by the parameter selectionprocess, an exploration search space in which to find a minima or maximaof a hyperplane defined by a subset of the configuration parameters ofthe configuration group by filtering out those of the subset of theconfiguration parameters that do not make an impact on the optimizationgoal.
 6. The method of claim 1, wherein the plurality of layers includesone or more of: an application layer, a database layer, or a searchlayer.
 7. The method of claim 1, wherein the corresponding configurationgroups include a set of operating system configuration parameters, a setof network configuration parameters, and a set of Java virtual machine(JVM) parameters.
 8. The method of claim 1, further comprisingiteratively performing the local optimization process through at least aportion of the nodes of the dependency graph until a stopping conditionis achieved.
 9. The method of claim 8, wherein the stopping condition isachieved if there is no change to a resulting value of a performancemetric specified by the optimization criteria from one iteration toanother for a predefined or configurable number of iterations of thelocal optimization process.
 10. A non-transitory machine readable mediumstoring instructions executable by a processing resource of a computersystem, the non-transitory machine readable medium comprisinginstructions configurable to cause the processing resource to: process aservice definition and optimization criteria for tuning a configurationof a service for a particular production environment, wherein theservice definition includes information regarding a plurality of layersof the service and corresponding configuration groups, eachconfiguration group including configuration parameters for acorresponding layer of the service and for which values areconfigurable; limit the configuration parameters to those configurationparameters represented within the corresponding configuration groupsthat have a particular level of an impact on an optimization goal forthe service; create an acyclic dependency graph including a plurality ofnodes, wherein a node represents a layer in the plurality of layers, theacyclic dependency graph representing the corresponding configurationgroups passed between the plurality of layers and representing ahierarchical relationship between the plurality of layers of theservice; and globally optimize values of configuration parameters of thecorresponding configuration groups by: creating an instance of theservice based on the service definition; and performing a localoptimization process based on the optimization criteria at each layer ofthe plurality of layers of the instance of the service by locallyoptimizing values of configuration parameters associated with aparticular layer in the plurality of layers for a first node beforepassing the optimized values of configuration parameters for the firstnode on to a parent node associated with a parent layer in the pluralityof layers as defined by the acyclic dependency graph and propagatingrespective optimized values for respective nodes that are associatedwith respective layers through the nodes of the dependency graph. 11.The non-transitory machine readable medium of claim 10, wherein theconfiguration parameters are limited by subjecting the configurationparameters to statistical analysis.
 12. The non-transitory machinereadable medium of claim 10, wherein the instructions are furtherconfigurable to cause the processing resource to: for each layer of theplurality of layers of the service and a configuration group of thecorresponding configuration groups corresponding to the layer, reduce anexploration search space in which to find a minima or maxima of ahyperplane defined by a subset of the configuration parameters of theconfiguration group by filtering out those of the subset of theconfiguration parameters that do not make an impact on the optimizationgoal.
 13. The non-transitory machine readable medium of claim 10,wherein the plurality of layers include one or more of: an applicationlayer, a database layer, or a search layer.
 14. The non-transitorymachine readable medium of claim 10, wherein the correspondingconfiguration groups include a set of operating system configurationparameters, a set of network configuration parameters, and a set of Javavirtual machine (JV M) parameter.
 15. The non-transitory machinereadable medium of claim 10, wherein the instructions are furtherconfigurable to cause the processing resource to iteratively perform thelocal optimization process through at least a portion of the nodes ofthe dependency graph until a stopping condition is achieved.
 16. Thenon-transitory machine readable medium of claim 15, wherein the stoppingcondition is achieved if there is no change to a resulting value of aperformance metric specified by the optimization criteria from oneiteration to another for a predefined or configurable number ofiterations of the local optimization process.
 17. A system comprising: aprocessing resource; a non-transitory computer-readable medium, coupledto the processing resource, having stored therein instructions that areconfigurable to cause the processing resource to: process a servicedefinition and optimization criteria for tuning a configuration of aservice for a particular production environment, wherein the servicedefinition includes information regarding a plurality of layers of theservice and corresponding configuration groups, each configuration groupincluding configuration parameters for a corresponding layer of theservice and for which values are configurable; limit the configurationparameters to those configuration parameters represented within thecorresponding configuration groups that have a particular level of animpact on an optimization goal for the service; create an acyclicdependency graph including a plurality of nodes, wherein a noderepresents a layer in the plurality of layers, the acyclic dependencygraph representing configuration groups passed between the plurality oflayers and representing a hierarchical relationship between theplurality of layers of the service; and globally optimize values ofconfiguration parameters of the configuration groups by: creating aninstance of the service based on the service definition; and until astopping condition is achieved, iteratively performing a localoptimization process based on the optimization criteria at each layer ofthe plurality of layers of the instance of the service by locallyoptimizing value of configuration parameters associated with aparticular layer in the plurality of layers for a first node beforepassing the optimized values of configuration parameters for the firstnode on to a parent node associated with a parent layer in the pluralityof layers as defined by the acyclic dependency graph and propagatingrespective optimized values for respective nodes that are associatedwith respective layers through the nodes of the dependency graph. 18.The system of claim 17, wherein the stopping condition is achieved ifthere is no change to a resulting value of a target performance metricspecified by the optimization criteria from one iteration to another fora predefined or configurable number of iterations of the localoptimization process.
 19. The system of claim 17, wherein theconfiguration parameters are limited by subjecting the configurationparameters to statistical analysis.
 20. The system of claim 17, whereinthe instructions configurable to cause the processing resource to foreach layer of the plurality of layers of the service and a configurationgroup of the corresponding configuration groups corresponding to thelayer, reduce an exploration search space in which to find a minima ormaxima of a hyperplane defined by a subset of the configurationparameters of the configuration group by filtering out those of thesubset of the configuration parameters that do not make an impact on theoptimization goal.